package plg.grupo1.Lexico.StateMachineHierarchy;

public class State14 implements State{
	
    private static State14 INSTANCE = null;    
	private State14(){}
	
    private synchronized static void createInstance() {
        if (INSTANCE == null) INSTANCE = new State14();
    }
    
    public static State14 getInstance() {
        if (INSTANCE == null) createInstance();
        return INSTANCE;
    }
    
	public void goNext(){

		if(Contexto.isEof()) 
			Contexto.setCurrentState(State19.getInstance());
		else{
			
			char c = Contexto.getCharAndMoveToNext();//A	
			if(Contexto.isEscape(c)) 
				Contexto.setCurrentState(State18.getInstance());
			else{
				Contexto.appendToLexema(c);//B
				Contexto.setCurrentState(State14.getInstance());
			}
		}
	}
}
